ActionController::Routing::Routes.draw do |map|

  map.connect '/signup', :controller => 'users', :action => 'new'
  map.connect '/login', :controller => 'session', :action => 'new'
  map.connect '/logout', :controller => 'session', :action => 'destroy'
  map.connect '/post/:id', :controller => 'posts', :action => 'show'

  map.resources :filters

  map.connect '/file/:id', :controller => 'images', :action => 'showfile'
  map.resources :comments

  map.resources :images, :member => { :showfile => :get }, :singular => :image

  map.resources :posts, :singular => 'post'

  map.connect '', :controller => "posts"
  map.resources :users
  map.resource  :session, :collection => { :begin => :post, :complete => :get }

  # Install the default route as the lowest priority.
  map.connect ':controller/:action/:id.:format'
  map.connect ':controller/:action/:id'
end
